package liangtWorkSpace.proxy.subject.House;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @ClassName BuyHourseHandle
 * @Description : 功能说明
 * @Author : LiangT
 * @Date : 2020/4/13 17:31
 */
public class BuyHourseHandle implements InvocationHandler {
    private Object object;

    public BuyHourseHandle(Object object) {
        this.object = object;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("动态代理：买房前准备");
        method.invoke(object,args);
        System.out.println("动态代理：买房后准备");
        return object;
    }
}
